import request from '@/utils/request'

//  应急事件调度

// 创建事件
export function getCreateEvent(param) {
    return request({
        url: 'rest/event/createEvent',
        method: 'post',
        data: param
    })
}

// 获取事件列表
export function getListByNameByLike(param) {
    return request({
        url: 'rest/event/getListByNameByLike',
        method: 'post',
        data: param
    })
}

// 查询事件人员投入列表
export function getPersonListByEventId(param) {
    return request({
        url: 'rest/eventCost/getPersonListByEventId',
        method: 'post',
        data: param
    })
}

// 查询事件设备投入列表
export function getEquipmentListByEventId(param) {
    return request({
        url: 'rest/eventCost/getEquipmentListByEventId',
        method: 'post',
        data: param
    })
}

// 查询事件材料投入列表
export function getMaterialListByEventId(param) {
    return request({
        url: 'rest/eventCost/getMaterialListByEventId',
        method: 'post',
        data: param
    })
}

// 查询事件临时材料投入列表
export function getListByEventId(param) {
    return request({
        url: 'rest/tempMaterial/getListByEventId',
        method: 'post',
        data: param
    })
}

// 获取单条事件信息
export function getEventList(param) {
    return request({
        url: 'rest/event/get',
        method: 'post',
        data: param
    })
} 

// 查询 上传处置记录
export function getEventRecordList(param) {
    return request({
        url: 'rest/eventRecord/list',
        method: 'post',
        data: param
    })
} 

// 保存事件记录
export function getEventRecordSave(param) {
    return request({
        url: 'rest/eventRecord/save',
        method: 'post',
        data: param
    })
}

// 归档 保存
export function getEventSummarySave(param) {
    return request({
        url: 'rest/eventSummary/saveEx',
        method: 'post',
        data: param
    })
}

// 查看 归档
export function getEventSummaryGet(param) {
    return request({
        url: 'rest/eventSummary/list',
        method: 'post',
        data: param
    })
}


// 编辑  
// 人员列表
export function getPersonList(param) {
    return request({
        url: 'rest/person/getListByOrgId',
        method: 'post',
        data: param
    })
}


export function person_getListByOrgIdNoProjectId(param) {
    return request({
        url: 'rest/person/getListByOrgIdNoProjectId',
        method: 'post',
        data: param
    })
}


// 获取设备/材料类型树形列表
export function getDeviceType(param) {
    return request({
        url: 'rest/ex/deviceType/getListByNameByLike',
        method: 'post',
        data: param
    })
}

// 设备
// 通过设备类型获取设备列表
export function getDeviceList(param) {
    return request({
        url: 'rest/equipment/getListByDeviceTypeId',
        method: 'post',
        data: param
    })
}

export function equipment_getListByDeviceTypeIdNoProjectId(param) {
    return request({
        url: 'rest/equipment/getListByDeviceTypeIdNoProjectId',
        method: 'post',
        data: param
    })
}

// 查询事件投入列表
export function getDeviceCostList(param) {
    return request({
        url: 'rest/eventCost/list',
        method: 'post',
        data: param
    })
}

// 设备 出库
export function getDeviceBatchSave(param) {
    return request({
        url: 'rest/eventCost/batchSave',
        method: 'post',
        data: param
    })
}

// 设备批量删除
export function getDeviceBatchDelete(param) {
    return request({
        url: 'rest/eventCost/batchDelete',
        method: 'post',
        data: param
    })
}

// 材料
// 通过材料类型获取材料列表
export function getMaterialList(param) {
    return request({
        url: 'rest/material/getListByDeviceTypeId',
        method: 'post',
        data: param
    })
}


export function material_getListByDeviceTypeIdNoProjectId(param) {
    return request({
        url: 'rest/material/getListByDeviceTypeIdNoProjectId',
        method: 'post',
        data: param
    })
}
// 临时材料批量保存
export function getTempMaterialSave(param) {
    return request({
        url: 'rest/tempMaterial/batchSave',
        method: 'post',
        data: param
    })
}

// 查询临时材料投入列表
export function getTempMaterialList(param) {
    return request({
        url: 'rest/tempMaterial/getListByEventId',
        method: 'post',
        data: param
    })
}

// 获取供应商列表
export function getSupplierList(param) {
    return request({
        url: 'rest/supplier/list',
        method: 'post',
        data: param
    })
}

// 保存 驾驶成本
export function getEventSave(param) {
    return request({
        url: 'rest/event/save',
        method: 'post',
        data: param
    })
}

// 设备 查看设备出库单
export function getEventCostBatchDelete(param) {
    return request({
        url: 'rest/eventCost/batchDelete',
        method: 'post',
        data: param
    })
}

// 删除列表
export function getEventDelete(param) {
    return request({
        url: 'rest/event/delete',
        method: 'post',
        data: param
    })
}

// 临时材料删除
export function getTempMaterialDelete(param) {
    return request({
        url: 'rest/tempMaterial/delete',
        method: 'post',
        data: param
    })
}

// 获取购物车选中的人员
export function getShoppingCartPersonList(param) {
    return request({
        url: 'rest/eventShoppingCart/getPersonListByEventId',
        method: 'post',
        data: param
    })
}
// 购物车保存
export function getShoppingCartBatchSave(param) {
    return request({
        url: 'rest/eventShoppingCart/batchSave',
        method: 'post',
        data: param
    })
}

// 购物车删除
export function getShoppingCartBatchDelete(param) {
    return request({
        url: 'rest/eventShoppingCart/batchDelete',
        method: 'post',
        data: param
    })
}

// 获取购物车劳务人员
export function getShoppingCartLaborPerson(param) {
    return request({
        url: 'rest/eventShoppingCart/getLaborPersonNumByEventId',
        method: 'post',
        data: param
    })
}

// 获取购物车数据
export function getEventShoppingCartList(param) {
    return request({
        url: 'rest/eventShoppingCart/getShoppingCartByEventId',
        method: 'post',
        data: param
    })
}

// 购物车设备数据
export function getShoppingCartEquipmentList(param) {
    return request({
        url: 'rest/eventShoppingCart/getEquipmentListByEventId',
        method: 'post',
        data: param
    })
}

// 购物车提交
export function getEventShoppingCartSubmit(param) {
    return request({
        url: 'rest/eventShoppingCart/submit',
        method: 'post',
        data: param
    })
}

export function getShoppingCartMaterialList(param) {
    return request({
        url: 'rest/eventShoppingCart/getMaterialListByEventId',
        method: 'post',
        data: param
    })
}


export function getEventCostByEventId(param) {
    return request({
        url: 'rest/eventCost/getEventCostByEventId',
        method: 'post',
        data: param
    })
}


// 结束险情
export function getEventEnd(param) {
    return request({
        url: 'rest/event/end',
        method: 'post',
        data: param
    })
}

// 数据推送
export function eventSetReportFlag(param) {
    return request({
        url: 'rest/event/setReportFlag',
        method: 'post',
        data: param
    })
}
// 查询日常巡检报告
export function dailyCheckReportGetDocument(param) {
    return request({
        url: "rest/dailyCheckReport/getDocument",
        method: 'post',
        data: param
    })
}
// 日常巡检报告新
export function dailyCheckReportReport(param) {
    return request({
        url: "rest/dailyCheckReport/Report",
        method: 'post',
        data: param
    })
}

// 获取呼叫人员
export function getVoiceCallPeople(param) {
    return request({
        url: "rest/voiceCall/list",
        method: 'post',
        data: param
    })
}

// 立即呼叫
export function callPeople(param) {
    return request({
        url: "rest/callback/call",
        method: 'post',
        data: param
    })
}